import cv2
import numpy as np

filename1 = r'C:\Users\Administrator\Desktop\chessboard.png'
filename2 = r'C:\Users\Administrator\Desktop\building.jpg'
image11 = cv2.imread(filename1)
image2 = cv2.imread(filename2)
image1= cv2.resize(image11,(int(image11.shape[1]/8),int(image11.shape[0]/8)))

fast1 = cv2.FastFeatureDetector_create(threshold=5, nonmaxSuppression=True, type=cv2.FAST_FEATURE_DETECTOR_TYPE_9_16)
kp1 = fast1.detect(image1, None)
cv2.drawKeypoints(image1,kp1,image1, color = (0, 0, 255))
cv2.imshow('FAST chessboard',image1)

fast2 = cv2.FastFeatureDetector_create(threshold=40, nonmaxSuppression=True, type=cv2.FAST_FEATURE_DETECTOR_TYPE_9_16)
kp2 = fast2.detect(image2, None)
cv2.drawKeypoints(image2,kp2,image2, color = (0, 0, 255))
cv2.imshow('FAST building',image2)

cv2.waitKey()
cv2.destroyAllWindows()